﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sửa Menu - TÂN HƯNG VIỆT - HOTLINE: 0835.125.795
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="CssJsRef" runat="server">
    <script type="text/javascript">
        function Cancel() {
            window.location = '/QuanLyNoiDung';
        }

        function Validate() {
            // validate name
            var errorTitle = false;
            var errorTitleMsg = "";
            var title = $("#ContentTitle").val();
            if (title == '') {
                errorTitleMsg = "Tiêu đề tin tức không được bỏ trống!";
                errorTitle = true;
            }

            if (errorTitle == true) {
                $("#error-title").html(errorTitleMsg);
                return false;
            }
            else {
                $("#error-title").html('');
                return true;
            }
        }

        function Submit() {
            if (Validate())
                document.forms[0].submit();
        }
	    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <div class="title-mainright1">
	    <h2 class="text1">Sửa Menu</h2>
    </div>

    <% Html.EnableClientValidation(); %> 
    <% using (Html.BeginForm("SuaMenu", "QuanLyNoiDung", FormMethod.Post, new { id = "form-news", enctype = "multipart/form-data" }))
       {%>
	<div class="content1">
		<div class="top-box2"><img src='<%=Url.Content("~/Content/images/top-box21.jpg")%>'/> </div>		
			<div class="center-box21">
			  <div style="margin-left:50px;">

			        <p>
	                    <label><span style="color:Orange;"><b>Tiêu đề</b></span></label>
	                    <br />
	                    <br />
	                    <%= Html.TextBox("ContentTitle", ViewData["MenuTitle"], new { size = "100", maxlength = "50" })%>
	                    <span id="error-title" style="color:#FF0000"></span>
	                </p>
	 
                    <input type="button" class="button" value="Lưu lại" onclick="Submit()" /> &nbsp;&nbsp;&nbsp;
                    <input type="button" class="button" value="Hủy bỏ" onclick="Cancel()" />
	               </div> 
			</div>            	
		<div class="bottom-box2"><img src='<%=Url.Content("~/Content/images/bottom-box21.jpg")%>'	></div>
	</div> 
    <%} %>
</asp:Content>
